1. Field of the Invention
The present invention relates to a computer-readable recording medium storing a shadow depicting program in 3-D computer image processing, a method of depicting a shadow, and a video game apparatus.
2. Description of the Related Art
For a 3-D computer image in a video game or the like, it is conventionally proposed to impart a shadow to a solid model drawn in a virtual 3-D space on a monitor screen, such as a game character comprising polygons to display the shadow of the game character. An image processing technique of this kind is disclosed in Japanese Unexamined Patent Publications No.9-47576 or No. 10-232943.
A shadow is imparted to a polygon model by perspectively transforming and projecting each polygon onto a projected plane and superimposing a shadow image for each polygon over background images such as the ground and floors.
When there are multiple solid models or polygons, shadow images of the solid models or polygons may sometimes overlap each other on the background image. When a shadow object is displayed with a translucent image, it is doubly translucent-treated in the area where the shadow images overlap, thus resulting in a lower transparency of the area where the shadow images overlap. This leads to a non-uniform transparency of the translucent shadow image and hence to an unnatural image display.
For example, for a game character 210 displayed on a display screen 200 as shown in FIG. 15, there occurs an area where the shadow of a polygon in front of the left leg of the game character 210 overlap the shadow of the right leg. The shadow depth in this superimposed area becomes higher than in the other areas, resulting in an unnatural image display.
The present invention solves the above-mentioned problems and has an object to provide a computer-readable recording medium storing a shadow depicting program in 3-D computer image processing, a shadow depicting method and a video game apparatus in which, even when shadow images overlap each other on background images, the shadow images in a superimposed area is prevented from becoming thicker than in the other areas, and which permits easy drawing of a realistic natural shadow image.
To achieve the aforementioned object, the present invention provides a computer-readable recording medium storing a program for 3-D computer image processing which displays a shadow of a solid model drawn in a virtual 3-D space of a monitor screen as a shadow object, wherein the medium storing a program which causes a computer to impart a shadow object to each of the solid models to be drawn; determines whether or not there are superimposed shadow objects from the positional relationship between shadow objects imparted to the solid models to be drawn; and conducts drawing processing, for an area where there are superimposed shadow objects, which displays only one shadow object from among the superimposed shadow objects.
In the recording medium of the invention, the determination of the superimposed shadow objects may comprise the steps of setting a flag showing the presence of shadow objects in correlation with the displayed positions of the shadow objects, and determining superimposition of the shadow objects with reference to the flag, or further, may comprise the step of setting the flag for each pixel.
The recording medium of the invention may display the shadow objects in a translucent manner.
To achieve the aforementioned object of the invention, there is provided a method of depicting a shadow in 3-D computer image processing which displays a shadow of a solid model drawn in a virtual 3-D space of a monitor screen as a shadow object. The method comprises the steps of imparting a shadow object to each of the solid models to be drawn; determining whether or not there are superimposed shadow objects from the positional relationship between shadow objects imparted to the solid models to be drawn; and conducting drawing processing, for an area where there are superimposed shadow objects, which displays only one shadow object from among the superimposed shadow objects.
In the method of depicting a shadow in 3-D computer image processing according to the invention, the determination of the superimposed shadow objects may comprise the steps of setting a flag showing the presence of shadow objects in correlation with the displayed positions of the shadow objects, and determining superimposition of the shadow objects with reference to the flag, or may comprise the step of setting the flag for each pixel.
In the method of depicting a shadow in 3-D computer image processing according to the invention, the shadow objects may be displayed in a translucent manner.
The video game apparatus of the invention comprises a computer controlling a game; and a recording medium storing a program which causes the computer to control the game; the program causing the computer to impart a shadow object to each of the solid models to be drawn; determine whether or not there are superimposed shadow objects from the positional relationship between shadow objects imparted to the solid models to be drawn; and conduct drawing processing, for an area where there are superimposed shadow objects, which display only one shadow object from among the superimposed shadow objects.
The present disclosure relates to subject matter contained in priority Japanese Patent Application No. HEI 11-375421, filed on Dec. 28, 1999, the contents of which is herein expressly incorporated by reference in its entirety.